extends Control
#因为VBoxContainer天天乱动我ui动画所以我决定把它扫地出门自己写一个更听话的

var ch

func c(if_x=false,if_y=true):
	ch=get_children()
	var h=0
	var mw=0
	for t in ch:
		if(t.rect_size.x>mw):mw=t.rect_size.x
		if(if_x):t.rect_position.x=0
		if(if_y):
			t.rect_position.y=h
			h+=t.rect_size.y
	rect_size=Vector2(mw,h)
	rect_min_size=rect_size

func _ready():
	c()

#func _process(delta):
#	c()
